﻿Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.Data.Sql
Imports Seuss.EnterpriseLibrary.Cryptograph
Imports Seuss.EnterpriseLibrary.DataAccess
Imports Seuss.EnterpriseLibrary.BusinessLogic

Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Data
Imports System.Web
Imports System.Web.Security
Imports System.Configuration

Partial Class Consulta_Consulta
    Inherits System.Web.UI.MasterPage
    Dim cPerCodigo As String = ""    

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If String.IsNullOrEmpty(Session("NombreCompleto")) Or Session("NombreCompleto") = "" Then
            Dim ldr As New List(Of IDataReader)
            Using ObjPool As New PoolDbCommand()
                Dim ObjUsuario As New DAL_Kiosco(ObjPool.Database)
                ObjPool.AddDbCommand(ObjUsuario.Get_cPerCodigo_And_NombreCompleto_By_cPerCodigo(IdentityUser.UserCode), PoolDbCommand.PoolDbCommandResultType.Query)
                ObjPool.Pooling(Nothing, ldr, True)
                If ldr(0).Read Then
                    cPerCodigo = ldr(0).GetString(0)
                    Session("NombreCompleto") = ldr(0).GetString(1)
                End If
                ObjUsuario = Nothing
            End Using
        End If
        lblNombrecompleto.Text = Session("NombreCompleto")
    End Sub
End Class

